package com.kuaidu.ll.quickreadnews;

import android.app.Application;
import android.os.Process;

import com.kuaidu.ll.quickreadnews.manager.ActivityStackManager;

/**
 * Created by liulei on 2017/6/26.
 * 管理工程类
 */

public class QRNewsApp extends Application{

    public static QRNewsApp mApp;

    @Override
    public void onCreate() {
        super.onCreate();

        initMain();

    }

    private void initMain() {
        mApp = this;
    }

    /**
     * 退出APP
     */
    public void exitApp(){
        try {
            ActivityStackManager.getInstance().removeAllActivity();
            Process.killProcess(Process.myPid());
            System.exit(0);
        }catch (Exception e){

        }

    }

    public QRNewsApp getNewIntstance(){
        return mApp;
    }

}
